package com.wuliu.system.service.impl;

import java.util.List;
import com.wuliu.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.wuliu.system.mapper.TspLoadingTrackMapper;
import com.wuliu.system.domain.TspLoadingTrack;
import com.wuliu.system.service.ITspLoadingTrackService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 装车单路由Service业务层处理
 * 
 * @author realue
 * @date 2023-10-25
 */
@Service
public class TspLoadingTrackServiceImpl extends ServiceImpl<TspLoadingTrackMapper, TspLoadingTrack> implements ITspLoadingTrackService {
    @Resource
    private TspLoadingTrackMapper tspLoadingTrackMapper;

    /**
     * 查询装车单路由
     * 
     * @param id 装车单路由主键
     * @return 装车单路由
     */
    @Override
    public TspLoadingTrack selectTspLoadingTrackById(String id) {
        return tspLoadingTrackMapper.selectTspLoadingTrackById(id);
    }

    /**
     * 查询装车单路由列表
     * 
     * @param tspLoadingTrack 装车单路由
     * @return 装车单路由
     */
    @Override
    public List<TspLoadingTrack> selectTspLoadingTrackList(TspLoadingTrack tspLoadingTrack) {
        return tspLoadingTrackMapper.selectTspLoadingTrackList(tspLoadingTrack);
    }

    /**
     * 新增装车单路由
     * 
     * @param tspLoadingTrack 装车单路由
     * @return 结果
     */
    @Override
    public int insertTspLoadingTrack(TspLoadingTrack tspLoadingTrack) {
        tspLoadingTrack.setCreateTime(DateUtils.getNowDate());
        return tspLoadingTrackMapper.insertTspLoadingTrack(tspLoadingTrack);
    }

    /**
     * 修改装车单路由
     * 
     * @param tspLoadingTrack 装车单路由
     * @return 结果
     */
    @Override
    public int updateTspLoadingTrack(TspLoadingTrack tspLoadingTrack) {
        tspLoadingTrack.setUpdateTime(DateUtils.getNowDate());
        return tspLoadingTrackMapper.updateTspLoadingTrack(tspLoadingTrack);
    }

    /**
     * 批量删除装车单路由
     * 
     * @param ids 需要删除的装车单路由主键
     * @return 结果
     */
    @Override
    public int deleteTspLoadingTrackByIds(String[] ids) {
        return tspLoadingTrackMapper.deleteTspLoadingTrackByIds(ids);
    }

    /**
     * 删除装车单路由信息
     * 
     * @param id 装车单路由主键
     * @return 结果
     */
    @Override
    public int deleteTspLoadingTrackById(String id) {
        return tspLoadingTrackMapper.deleteTspLoadingTrackById(id);
    }
}
